function header(){
		$("#header").load("common.html")
		$(function(){
			//header-top-left
			$("#header").on("mouseover",".header_top .top_left .lp .span",function(){
				$(this).find(".dress").show();
			})
			$("#header").on("mouseout",".header_top .top_left .lp .span",function(){
				$(this).find(".dress").hide();
			})
			//用户
			if(getCookie("login")){
				var str = "";
				var name = getCookie("name");
				str += ' <p class="yonghu"> <a class="ming" href="#">'+name+'</a> <a class="tuichu" href="login.html"> 退出 </a></p>'
				$("#header .header_top .top_left .login").replaceWith(str);
			}
			//header-top-right
			$("#header").on("mouseover",".header_top .top_right li.tab",function(){
				$(this).find(".show").show();
			})
			$("#header").on("mouseout",".header_top .top_right li.tab",function(){
				$(this).find(".show").hide();
			})
		})
	
		//header-header-宝贝、店铺
		$(function(){
			var _index = 0;
			$("#header").on("click",".header_header .center .up li",function(){
				_index = $(this).index();
				$(this).css({"background":"#e31939","color":"#fff"}).siblings().css({"background":"#fff","color":"#666"})
			})
			$("#header").on("mouseover",".header_header .center .up li",function(){
				$(this).css({"background":"peachpuff"})
				$("#header .header_header .center .up li").eq(_index).css({"background":"#e31939","color":"#fff"})
			})
			$("#header").on("mouseout",".header_header .center .up li",function(){
				$("#header .header_header .center .up li").not($("#header .header_header .center .up li").eq(_index)).css({"background":"#fff"})
			})
			
			$("#header").on("click",".header_header .center .down .btn_list",function(){
				var listid = $(this).attr("listid");
				var listming = $(this).html();
				setCookie("listid",listid)
				setCookie("listming",listming)
			})
		})
		
		//三级菜单
		$(function(){
			$("#header").on("mouseover", ".header_nav .all_shop .two_list>li",function(){
				$(this).find(".list").show();
			})
			$("#header").on("mouseout",".header_nav .all_shop .two_list>li",function(){
				$(this).find(".list").hide();
			})
		})
}

/////////////////右侧窗口定位菜单
function window_r(){
				$("#window_right").load("window-r.html")
				$("#window_right ").on("mouseover",".yonghu",function(){
					$(this).find(".login").show()
				})
				$("#window_right ").on("mouseout",".yonghu",function(){
					$(this).find(".login").hide()
				})
				$("#window_right ").on("mouseover",".xiaoshou",function(){
					$(this).find(".xiaoshou_L").show()
				})
				$("#window_right ").on("mouseout",".xiaoshou",function(){
					$(this).find(".xiaoshou_L").hide()
				})
				$("#window_right ").on("mouseover",".diaocha",function(){
					$(this).css({"background": "#DD102E"})
					$(this).find(".p1").stop(true).animate({"marginTop":"-46px"})
					$(this).find(".diaocha_l").show()
				})
				$("#window_right ").on("mouseout",".diaocha",function(){
					$(this).css({"background": "transparent"})
					$(this).find(".diaocha_l").hide()
					$(this).find(".p1").stop(true).animate({"marginTop":"0"})
				})
				$("#window_right ").on("mouseover",".guanzhu",function(){
					$(this).css({"background": "#DD102E"})
					$(this).find(".p1").stop(true).animate({"marginTop":"-46px"})
				})
				$("#window_right ").on("mouseout",".guanzhu",function(){
					$(this).css({"background": "transparent"})
					$(this).find(".p1").stop(true).animate({"marginTop":"0"})
				})
				$("#window_right ").on("mouseover",".shoucang",function(){
					$(this).css({"background": "#DD102E"})
					$(this).find(".p1").stop(true).animate({"marginTop":"-46px"})
				})
				$("#window_right ").on("mouseout",".shoucang",function(){
					$(this).css({"background": "transparent"})
					$(this).find(".p1").stop(true).animate({"marginTop":"0"})
				})
				$("#window_right ").on("mouseover",".weixin",function(){
					$(this).css({"background": "#DD102E"})
					$(this).find(".p1").stop(true).animate({"marginTop":"-46px"})
					$(this).find(".weixin_l").show()
				})
				$("#window_right ").on("mouseout",".weixin",function(){
					$(this).css({"background": "transparent"})
					$(this).find(".weixin_l").hide()
					$(this).find(".p1").stop(true).animate({"marginTop":"0"})
				})
				$(window).scroll(function(){
					var $t = $(this).scrollTop();
					if($t > 800){
						$("#window_right .ftop").show();
					}else{
						$("#window_right .ftop").hide();
					}
				})
				$("#window_right ").on("click",".ftop",function(){
					$("body,html").animate({"scrollTop":0})
				})
				$("#window_right ").on("mouseover",".ftop",function(){
					$(this).css({"background": "#DD102E"})
					$(this).find(".p1").stop(true).animate({"marginTop":"-46px"})
				})
				$("#window_right ").on("mouseout",".ftop",function(){
					$(this).css({"background": "transparent"})
					$(this).find(".p1").stop(true).animate({"marginTop":"0"})
				})
				$("#window_right .yonghu .login .btn").click(function(){
					var name = $("#window_right .yonghu .login .name input").val();
					var pass = $("#window_right .yonghu .login .pass input").val();
					if(name != getCookie("name")){
						alert("用户名不存在");
					}else if(pass != getCookie("pass")){
						alert("密码错误");
					}else{
						alert("登录成功");
						setCookie("login","true")
						window.location.href = "index.html";
					}
				})
			}